package com.hooya.fa.eu.biz.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hooya.fa.eu.biz.dao.entity.MetaProduct;
import com.hooya.fa.eu.biz.dao.entity.dto.InvoiceDataDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @Description 1
 * @Author : Zongz
 * @Copyright Copyright (c) 豪雅集团
 * @Create 2023/12/22
 * @Version 1.0.0
 */
@Mapper
public interface MetaProductMapper extends BaseMapper<MetaProduct> {

	/**
	 * 将所有needFlag为1的记录设置为0
	 */
	@Update("UPDATE fa_eu.meta_product SET needFlag = 0 WHERE needFlag = 1")
	int resetNeedFlagToZero();

	/**
	 * 批量更新指定SKU的needFlag为1
	 */
	int batchUpdateNeedFlagToOne(@Param("skuList") List<String> skuList);


    List<InvoiceDataDTO> getDescription();

}
